[LIBXC] Provide weak stub default implementations of xc_hvm_save() and
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Tue, 23 Jan 2007 15:58:05 +0000 (15:58 +0000)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Tue, 23 Jan 2007 15:58:05 +0000 (15:58 +0000)
xc_hvm_restore() for architectures with no full implementation.
Signed-off-by: Keir Fraser <keir@xensource.com>
tools/libxc/xg_private.c

index 1af646fc82106fd84f837d507e978fe8da4b417c..f45c2ebb0db70f4404b553ab26722ca07eced2ce 100644 (file)
@@ -188,11 +188,32 @@ unsigned long csum_page(void *page)
     return sum ^ (sum>>32);
 }
 
-__attribute__((weak)) int xc_hvm_build(
-    int xc_handle,
-    uint32_t domid,
-    int memsize,
-    const char *image_name)
+__attribute__((weak)) 
+int xc_hvm_build(int xc_handle,
+                 uint32_t domid,
+                 int memsize,
+                 const char *image_name)
 {
-    return -ENOSYS;
+    errno = ENOSYS;
+    return -1;
+}
+
+__attribute__((weak)) 
+int xc_hvm_save(int xc_handle, int io_fd, uint32_t dom, uint32_t max_iters,
+                uint32_t max_factor, uint32_t flags,
+                int (*suspend)(int domid))
+{
+    errno = ENOSYS;
+    return -1;
+}
+
+__attribute__((weak)) 
+int xc_hvm_restore(int xc_handle, int io_fd, uint32_t dom,
+                   unsigned long nr_pfns, unsigned int store_evtchn,
+                   unsigned long *store_mfn, unsigned int console_evtchn,
+                   unsigned long *console_mfn,
+                   unsigned int pae, unsigned int apic)
+{
+    errno = ENOSYS;
+    return -1;
 }